import { Pipe, PipeTransform } from '@angular/core';
import { TaskTarget } from '../services/task.service';

@Pipe({
  name: 'taskTarget'
})
export class TaskTargetPipe implements PipeTransform {
  transform(value: any, args?: any): any {
    switch (value) {
      case TaskTarget.All:
        return "全部";
      case TaskTarget.Zone:
        return "区域";
      case TaskTarget.Computer:
        return "终端";
      case TaskTarget.Personnel:
        return "人员";
      case TaskTarget.Software:
        return "软件";
      case TaskTarget.ComputerSoftware:
        return "终端软件";
      case TaskTarget.ZoneSoftware:
        return "区域软件";
      case TaskTarget.ZoneAndUser:
        return "区域人员";
      case TaskTarget.AreaComputer:
        return "区域终端"
    }
    return value;
  }

}
